﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace AETools.UI
{
    public partial class frmExportFactors : Form
    {
        public bool isHaveFiles = true;
        public List<string> FileNames = new List<string>();
        public frmExportFactors()
        {
            InitializeComponent();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            OpenFileDialog sfd = new OpenFileDialog();
            sfd.Multiselect = true;
            sfd.Filter = "逻辑回归参数文件(*.txt)|*.txt";
            //sfd.Title = "选择shp文件保存路径";
            if (sfd.ShowDialog() != DialogResult.OK)
                return;
            textBox1.Text = sfd.FileNames[0];
            FileNames = sfd.FileNames.ToList();
            isHaveFiles = checkBox1.Checked;
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if(checkBox1.Checked==true)
            {
                textBox1.Enabled = true;
                button7.Enabled = true;
                isHaveFiles = true;
            }
            else
            {
                textBox1.Enabled = false;
                button7.Enabled = false;
                isHaveFiles = false;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
}
